package script.mainpage.items
{
	import laya.events.Event;
	
	import script.prefabScript.BookContents;
	
	import ui.items.CategoryBtnUI;
	
	public class CategoryBtnCell extends CategoryBtnUI
	{
		public function CategoryBtnCell()
		{
			super();
		}
		
		public function setData(data:Object):void
		{
			this.cateBtn.skin = data.btnImg;
			this.cateName.text = data.categoryName;
			
			//this.on(Event.CLICK,this,onClick
		}
		
		public function clickBtn(selected:Boolean):void
		{
			this.cateBtn.selected = selected;
			
			this.cateName.bgColor = selected ? "#FFFF00":null;
		}
	}
}